-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Add {m365_defender,microsoft_defender_endpoint}.vulnerability indices to kibana_system role permissions #132445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…party vulnerability findings workflow.
Pinging @elastic/es-security (Team:Security) |
"logs-m365_defender.vulnerability-*", | ||
"logs-microsoft_defender_endpoint.vulnerability-*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This adds permission for the transform, without which results in following error inside the transform:
Cannot create transform [logs-m365_defender.latest_cdr_vulnerabilities-default-0.1.0] because user elastic/kibana lacks the required permissions [logs-m365_defender.vulnerability-*:[read], security_solution-m365_defender.vulnerability_latest:[], security_solution-m365_defender.vulnerability_latest-v1:[]]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a note: Per ILM policy you shared, Kibana needs the permission to execute rollover action but that is already covered by logs-*
pattern here:
Lines 311 to 329 in 78c49a6
"logs-*", | |
"synthetics-*", | |
"traces-*", | |
"/metrics-.*&~(metrics-endpoint\\.metadata_current_default.*)/", | |
".logs-endpoint.action.responses-*", | |
".logs-endpoint.diagnostic.collection-*", | |
".logs-endpoint.actions-*", | |
".logs-endpoint.heartbeat-*", | |
".logs-osquery_manager.actions-*", | |
".logs-osquery_manager.action.responses-*", | |
"logs-osquery_manager.action.responses-*", | |
"profiling-*" | |
) | |
.privileges( | |
TransportUpdateSettingsAction.TYPE.name(), | |
TransportPutMappingAction.TYPE.name(), | |
RolloverAction.NAME, | |
"indices:admin/data_stream/lifecycle/put" | |
) |
// For source indices of the Cloud Detection & Response (CDR) packages | ||
// that has ILM policy | ||
RoleDescriptor.IndicesPrivileges.builder() | ||
.indices("logs-m365_defender.vulnerability-*", "logs-microsoft_defender_endpoint.vulnerability-*") | ||
.privileges( | ||
// Require "delete_index" to perform ILM policy actions | ||
TransportDeleteIndexAction.TYPE.name() | ||
) | ||
.build(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the permission error for the ILM policy.
The ILM policies are already part of existing integration code: here and here.
Without this correct permissions following error is received when deleting index as user with kibana_system
role (as in ILM).
{
"error": {
"root_cause": [
{
"type": "security_exception",
"reason": "action [indices:admin/delete] is unauthorized for user [kibana-system] with effective roles [editor,kibana_system,viewer] on indices [.ds-logs-m365_defender.vulnerability-default-2025.08.05-000002], this action is granted by the index privileges [delete_index,manage,all]"
}
],
"type": "security_exception",
"reason": "action [indices:admin/delete] is unauthorized for user [kibana-system] with effective roles [editor,kibana_system,viewer] on indices [.ds-logs-m365_defender.vulnerability-default-2025.08.05-000002], this action is granted by the index privileges [delete_index,manage,all]"
},
"status": 403
}
@slobodanadamovic, I couldn't see labels |
...src/test/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStoreTests.java
Outdated
Show resolved
Hide resolved
...va/org/elasticsearch/xpack/core/security/authz/store/KibanaOwnedReservedRoleDescriptors.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (from es-security side; left only optional comments)
Please make sure to get approval from @elastic/kibana-security team as well.
The |
And |
I'm wrong about the |
…permissions # Conflicts: # x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStoreTests.java
… to kibana_system role permissions (elastic#132445) Add logs-m365_defender.vulnerability-* and logs-microsoft_defender_endpoint.vulnerability-* data stream indices to the kibana_system's read privileges. This is required for the latest transform for 3rd party integrations CDR workflows (vulnerability findings) to work. Also add delete_index on logs-m365_defender.vulnerability-* and logs-microsoft_defender_endpoint.vulnerability-* to facilitate index removal through ILM policies. (cherry picked from commit 716bff8)
… to kibana_system role permissions (elastic#132445) Add logs-m365_defender.vulnerability-* and logs-microsoft_defender_endpoint.vulnerability-* data stream indices to the kibana_system's read privileges. This is required for the latest transform for 3rd party integrations CDR workflows (vulnerability findings) to work. Also add delete_index on logs-m365_defender.vulnerability-* and logs-microsoft_defender_endpoint.vulnerability-* to facilitate index removal through ILM policies. (cherry picked from commit 716bff8)
… to kibana_system role permissions (elastic#132445) Add logs-m365_defender.vulnerability-* and logs-microsoft_defender_endpoint.vulnerability-* data stream indices to the kibana_system's read privileges. This is required for the latest transform for 3rd party integrations CDR workflows (vulnerability findings) to work. Also add delete_index on logs-m365_defender.vulnerability-* and logs-microsoft_defender_endpoint.vulnerability-* to facilitate index removal through ILM policies. (cherry picked from commit 716bff8)
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
… to kibana_system role permissions (elastic#132445) Add logs-m365_defender.vulnerability-* and logs-microsoft_defender_endpoint.vulnerability-* data stream indices to the kibana_system's read privileges. This is required for the latest transform for 3rd party integrations CDR workflows (vulnerability findings) to work. Also add delete_index on logs-m365_defender.vulnerability-* and logs-microsoft_defender_endpoint.vulnerability-* to facilitate index removal through ILM policies. (cherry picked from commit 716bff8) # Conflicts: # x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/KibanaOwnedReservedRoleDescriptors.java
… to kibana_system role permissions (#132445) (#132627) Add logs-m365_defender.vulnerability-* and logs-microsoft_defender_endpoint.vulnerability-* data stream indices to the kibana_system's read privileges. This is required for the latest transform for 3rd party integrations CDR workflows (vulnerability findings) to work. Also add delete_index on logs-m365_defender.vulnerability-* and logs-microsoft_defender_endpoint.vulnerability-* to facilitate index removal through ILM policies. (cherry picked from commit 716bff8)
… to kibana_system role permissions (#132445) (#132628) Add logs-m365_defender.vulnerability-* and logs-microsoft_defender_endpoint.vulnerability-* data stream indices to the kibana_system's read privileges. This is required for the latest transform for 3rd party integrations CDR workflows (vulnerability findings) to work. Also add delete_index on logs-m365_defender.vulnerability-* and logs-microsoft_defender_endpoint.vulnerability-* to facilitate index removal through ILM policies. (cherry picked from commit 716bff8)
… to kibana_system role permissions (#132445) (#132629) Add logs-m365_defender.vulnerability-* and logs-microsoft_defender_endpoint.vulnerability-* data stream indices to the kibana_system's read privileges. This is required for the latest transform for 3rd party integrations CDR workflows (vulnerability findings) to work. Also add delete_index on logs-m365_defender.vulnerability-* and logs-microsoft_defender_endpoint.vulnerability-* to facilitate index removal through ILM policies. (cherry picked from commit 716bff8)
…indices to kibana_system role permissions (#132445) (#132630) * Add {m365_defender,microsoft_defender_endpoint}.vulnerability indices to kibana_system role permissions (#132445) Add logs-m365_defender.vulnerability-* and logs-microsoft_defender_endpoint.vulnerability-* data stream indices to the kibana_system's read privileges. This is required for the latest transform for 3rd party integrations CDR workflows (vulnerability findings) to work. Also add delete_index on logs-m365_defender.vulnerability-* and logs-microsoft_defender_endpoint.vulnerability-* to facilitate index removal through ILM policies. (cherry picked from commit 716bff8) # Conflicts: # x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/KibanaOwnedReservedRoleDescriptors.java * fix conflicts * fix conflicts
Add
logs-m365_defender.vulnerability-*
andlogs-microsoft_defender_endpoint.vulnerability-*
data stream indices to thekibana_system
'sread
privileges. This is required for the latest transform for 3rd party integrations CDR workflows (vulnerability findings) to work.Also add
delete_index
onlogs-m365_defender.vulnerability-*
andlogs-microsoft_defender_endpoint.vulnerability-*
to facilitate index removal through ILM policies defined here and hereRelated:
Similar to #124074 and #128350